package com.sai.homework;
import java.util.Scanner;

public class task02 {

    static String[][] str = new String[16][16];

    public static void show() {

        for (int i = 0; i < 17; i++){
            if (0 == i){
                System.out.print("  ");
            }else {System.out.printf("%x ", i-1); }
        }
        System.out.println();

        for (int i = 0; i < 16; i++){
            for (int j =0; j < 17; j++){
                if (0 == j){
                    System.out.printf("%x ",i);
                }else{
                    System.out.print(str[i][j-1]);
                }
            }
            System.out.println();
        }

    }
    public static void show2() {
        System.out.println("请白方下棋，横坐标是：");
        Scanner sc = new Scanner(System.in);
        int x1 = sc.nextInt();
        System.out.println("纵坐标是：");
        Scanner sc1 = new Scanner(System.in);
        int y1 = sc1.nextInt();
        str[x1][y1] = "1 ";

        System.out.println("请黑方下棋，横坐标是：");
        Scanner sc2 = new Scanner(System.in);
        int x2 = sc2.nextInt();
        System.out.println("纵坐标是：");
        Scanner sc3 = new Scanner(System.in);
        int y2 = sc3.nextInt();
        str[x2][y2] = "2 ";
        task02.show();

    }
    public void show3() {

    }
    public static void main(String[] args) {

        for (int i = 0; i < 16; i++){
            for (int j = 0; j < 16; j++){
                str[i][j] = "+ ";
            }
        }
        task02.show2();

    }

}
